package controller

import (
	"github.com/gin-gonic/gin"
)

// SuccessJson 返回json
func SuccessJson(context *gin.Context, data interface{}) {
	context.JSON(200, data)
}

func BindJSON(c *gin.Context, v interface{}) {
	err := c.ShouldBindJSON(v)
	if err != nil {
		panic(err)
	}
}
